import {Base} from '../../utils/base'

class Category extends Base {
    constructor() {
        super();
    }

    getCategoryType(callback) {
        var param = {
            url: 'category/all',
            sCallBack: (res => {
                callback && callback(res)
            })
        }
        this.request(param);
    }

    getCategoryDetailById(id, callback) {
        var param = {
            url:'category/detail/'+id,
            sCallBack: (res=>{
                callback && callback(res.products);
            })
        }
        this.request(param);
    }
}
export {Category}